import { http } from "@/common/service/service.js";

/**
 * 员工工种管理API
 */
export const employeeWorkTypeApi = {
  /**
   * 根据员工ID获取工种列表
   * @param {string} employeeId 员工ID
   * @returns {Promise}
   */
  getEmployeeWorkTypes(employeeId) {
    return http.get(`/mes/employee-worktype/employee-worktypes/${employeeId}`);
  },

  /**
   * 分页查询员工工种分配
   * @param {Object} params 查询参数
   * @param {number} params.pageNo 页码
   * @param {number} params.pageSize 每页大小
   * @param {string} params.employeeId 员工ID
   * @returns {Promise}
   */
  queryPageList(params) {
    return http.get("/mes/employee-worktype/list", params);
  },
};

export default employeeWorkTypeApi;
